<?php
	class hinhthuclanhlaibs
	{
		public $MaHTLanhLai = 0;
		public $TenHTLanhLai = "";
		public $ThoiGianLanhLai = 0;
		
		public function Them()
		{
			$db = new hinhthuclanhlaidb();
			return $db->Them($this->MaHTLanhLai, 
							 $this->TenHTLanhLai,
							 $this->ThoiGianLanhLai);
		}
		
		public function CapNhat()
		{
			$db = new hinhthuclanhlaidb();
			return $db->CapNhat($this->MaHTLanhLai,
							    $this->TenHTLanhLai,
								$this->ThoiGianLanhLai);
		}
		
		public function TonTaiTrongSoTietKiem()
		{
			$db = new hinhthuclanhlaidb();
			return $db->TonTaiTrongSoTietKiem($this->MaHTLanhLai);
		}
		
		public function Xoa()
		{
			$db = new hinhthuclanhlaidb();
			return $db->Xoa($this->MaHTLanhLai);
		}
		
		public function XoaTatCa()
		{
			$db = new hinhthuclanhlaidb();
			return $db->XoaTatCa();
		}
		
		public function LayDanhSach()
		{
			$db = new hinhthuclanhlaidb();
			return $db->LayDanhSach($this->MaHTLanhLai,
									$this->TenHTLanhLai,
									$this->ThoiGianLanhLai);
		}
	}
?>